<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>广东省传播平台-资源状态金额统计表</title>
		<link rel="stylesheet" type="text/css" href=" <%=request.getContextPath()%>/css/common.css"  />
		<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/css/tag.css" />
		<script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery-1.7.2.js"></script>
		<script type="text/javascript" src="<%=request.getContextPath()%>/js/My97DatePicker/WdatePicker.js"> </script>
		<link href="<%=request.getContextPath()%>/js/My97DatePicker/skin/WdatePicker.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript">


		 function checkKey(){
			    var startDate = $.trim(document.getElementById("startDate").value);
			    var endDate = $.trim(document.getElementById("endDate").value);
			    if(startDate==null||''==startDate)
			    {
			      alert("请选择开始时间！");
			      return false;
			    }
			    if(endDate==null||''==endDate)
			    {
			      alert("请选择结束时间！");
			      return false;
			    }
			    if(endDate==startDate){
			      alert("结束时间要大于开始时间！");
			      return false;
			    }
			    doSubmit('ResourceStateAction.action');
			}
	   
	     //提交表单
	  	     function doSubmit(url){
					document.forms[0].action=url;
					document.forms[0].submit();
				}
	     //分页
		function pageSub(currentPage) {
				var reg=/^\d*?$/;
				var total =${page.totalPages};
				if (reg.test(currentPage)) {
					if (currentPage > total) {
						$("#currentPage").val(total);
					} else {
						$("#currentPage").val(currentPage);
					}
				
					document.forms[0].action = "ResourceStateAction.action";
					document.forms[0].submit();
				} else {
					alert("请输入数字！");
				}
			}
     </script>
	</head>

	<body>
		<!-- 顶栏start -->
		<jsp:include page="../common/top.jsp"></jsp:include>
		<!-- 顶栏end -->
		
		<!-- 顶部start -->
		<div id="main">
			<div class="body">
				<!-- 导航菜单 -->
				<jsp:include page="../common/nav.jsp"></jsp:include>
				<!-- 主体 -->
				<div class="main_body">
					<form action="" method="post">
					<input type="hidden" name="type" value="${type}"/>
					    <h3 style="color:#000000; font-size:14px;height: 20px;
					    background: url(images/banners30.jpg) repeat-x;
					    margin-bottom: 2px;" >
					           资源状态金额统计表
					    </h3>
						<table class="condition bg1"
							style="width: 100%; font-size: 14px; font-weight: bold; color: #000000;"
							align="center">
							<tr>
								
								<td width="8%" style="height: 40px; text-align:right;">
									&nbsp;<label>时间段：</label>
								</td>
								<td width="32%" style="height: 40px;">
								    <input type="text" class="text Wdate" name="startDate" id="startDate" readonly="readonly"
									value="${startDate}" onfocus="WdatePicker({maxDate:'#F{$dp.$D(\'endDate\')||\'2050-10-01\'}'});" />
									&nbsp;-&nbsp;
								    <input type="text" class="text Wdate" name="endDate" id="endDate" readonly="readonly"
									value="${endDate}" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'startDate\')}',maxDate:'2050-10-01'})"  />
								</td>
								
								<td width="15%" style="height: 40px;">
								<s:select name="userCity" id="city" list="dataListUserCITY"
										listKey="id" listValue="datavalue" >
								</s:select>
								</td>
								<td style="height: 40px;">
								    &nbsp;&nbsp;
									<input name="button" type="button" class="btn-title" value="查询"
									onclick="checkKey();"/>
								</td>
								
							</tr>
						</table>
						<s:if test="startDate != null && startDate != ''">
						<div id="list_div">
							<input type="hidden" name="currentPage" id="currentPage" />
							<table class="table_list" style="width: 100%;" align="center">
								<tr class="bg">
									<th style="background:url(images/line2.png) no-repeat;height:31px; width:70px" >
									<div align="right" style="height: 15px;">类型</div><div align="left" style="height: 15px;">日期</div>
									</th>
									<th>预占</th>
									<th>呈批中</th>
									<th>占用</th>
									<th>完成投放</th>
									<th>完成预算</th>
									<th>中止</th>
									<th>小计</th>
								</tr>
								<s:iterator value="dataListResourceState" id="clist" status="list">
									<tr>
									    <td style="text-align: center" >${clist.logTime}</td>
									    <td style="text-align: center">${clist.fundAmount1}</td>
									    <td style="text-align: center">${clist.fundAmount2}</td>
									    <td style="text-align: center">${clist.fundAmount3}</td>
									    <td style="text-align: center">${clist.fundAmount4}</td>
									    <td style="text-align: center">${clist.fundAmount5}</td>
									    <td style="text-align: center">${clist.fundAmount6}</td>
									    <td style="text-align: center">${clist.fundAmountXJ}</td>
									</tr>
								</s:iterator>
							</table>
							<!-- 分页 -->
							<jsp:include page="/jsp/common/page.jsp"></jsp:include>
						</div>
						</s:if>
					</form>
				</div>
			</div>
		</div>
		
		<!-- 顶部end -->
		<jsp:include page="/jsp/common/bottom.jsp"></jsp:include>
	</body>
</html>
